package test0ne;

public class FirstTest {
    public static void main(String[] args) {
        Parent p = new Parent();
        p.setpAge("222");
        p.setpName("parent");

        Child child = new Child("张磊", "20", p);
        System.out.println(child);

        Child child1 = child.clone();
        System.out.println(child1);
        System.out.println(child == child1);

        System.out.println(child.getName() + "_"+ child.getAge() + "_" + child.getParent().getpName());
        System.out.println(child1.getName() + "_"+ child1.getAge() + "_" + child.getParent().getpName());

        child1.setAge("21");
        child.getParent().setpName("pppp");

        System.out.println(child.getName() + "_"+ child.getAge() + "_" + child.getParent().getpName());
        System.out.println(child1.getName() + "_"+ child1.getAge() + "_" + child.getParent().getpName());

        Integer a = null;
        Integer b = null;
        System.out.println(a.equals(b));
    }
}
